#ifndef FIRST_PERSON_CAMERA_CONTROLLER_H
#define FIRST_PERSON_CAMERA_CONTROLLER_H

#include <OgreSceneManager.h>

#include <OIS.h>

class FirstPersonCameraController
{
public:
	FirstPersonCameraController(Ogre::SceneManager* sceneManager, Ogre::Real moveSpeed = 10.0f, Ogre::Real rotationSpeed = 0.25f);
	void update(OIS::Keyboard* keyboard, OIS::Mouse* mouse, unsigned long lastFrameDuration);
	void setPosition(Ogre::Vector3 position);
	void getPositionOrientation(Ogre::Vector3& position, Ogre::Quaternion& orientation);

private:
	Ogre::SceneManager* sceneManager;

	Ogre::SceneNode* cameraNode;
	Ogre::SceneNode* cameraYawNode;
	Ogre::SceneNode* cameraPitchNode;
	Ogre::SceneNode* cameraRollNode;

	Ogre::Vector3 cameraTranslation;
    Ogre::Real cameraMoveSpeed;
    Ogre::Degree cameraRotationSpeed;
    Ogre::Radian cameraRotationX;
    Ogre::Radian cameraRotationY;
};

#endif
